﻿namespace ExtensionMethods
{
    public class Teacher
    {
        public int SecuredMarks;
        public int MaxMarks;
        public int Percentage;
    }

    public class MakrsCalculation
    {
        public void CalculatePercentage(Teacher t)
        {
            // create object of inner class
            CalculationHelper ch = new CalculationHelper();

            t.Percentage = t.SecuredMarks / ch.Multiply(t.MaxMarks, 100);
        }

        // inner class
        public class CalculationHelper
        {
            public int Multiply(int n1, int n2)
            {
                return n1 * n2;
            }
        }
    }
}